<%@ page language="java" import="com.qipay.admin.tags.PageModel" contentType="text/html;charset=utf-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.List" %>
<%@ page import="com.qipay.admin.cp.vo.CpPostDTO" %>
<%@ page import="com.qipay.security.UserDetailsServiceImpl" %>
<%@ page import="com.qipay.admin.utils.SiteHelper" %>
<%@ page import="com.qipay.user.entity.UserLevel" %>
<%@ page import="com.qipay.admin.cp.vo.CpInfoDTO" %>
<%@ page import="com.qipay.baas.model.Cp" %>
<%@ page import="com.qipay.baas.model.CpAccount" %>
<%@ page import="com.qipay.baas.model.User" %>
<!doctype html>
<html>
<head>
    <jsp:include page="head.jsp"></jsp:include>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <jsp:include page="nav.jsp"></jsp:include>
    <jsp:include page="left.jsp"></jsp:include>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <% CpInfoDTO cpInfo = (CpInfoDTO) request.getAttribute("detail");
                            Boolean isAdd = String.valueOf(request.getAttribute("isadd")).equals("1");
                            User userDetails = (User) request.getAttribute("user");
                            Cp cpModel = cpInfo.getCp()!=null?cpInfo.getCp():new Cp();
                            CpAccount cpAccount = cpInfo.getCpAccount()!=null?cpInfo.getCpAccount():new CpAccount();
                        %>
                        <div class="box-header">
                            <h3 class="box-title"> <button type="button" class="btn btn-default" onclick="window.history.back()">返回
                            </button></h3>
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">
                            <dl class="dl-horizontal">
                                <dt>账号：</dt>
                                <dd><%= userDetails.getName()%></dd>
                                <dt>级别：</dt>
                                <dd><%= SiteHelper.getUserLevelStrByLevel(userDetails.getLevel())%></dd>
                                <dt>余额：</dt>
                                <dd><%= cpAccount.getBalance()/100.00%>元</dd>
                                <dt>可用余额：</dt>
                                <%--<dd><%= cpAccount.getBalanceAdvance()/100.00%>元</dd>--%>
                                <%--<dt>垫支余额：</dt>--%>
                                <dd><%= cpAccount.getBalanceAdvance()/100.00%>元</dd>
                                <dt>不可用余额：</dt>
                                <dd><%= cpAccount.getBalanceDisabled()/100.00%>元</dd>
                                <hr>
                                <dt>帐号状态：</dt>
                                <dd><%= SiteHelper.getAccountString(cpModel.getAccountState())%></dd>
                                <dt>签约状态：</dt>
                                <dd><%=SiteHelper.getContractString(cpModel.getContractState())%></dd>
                                <dt>分配的appid：</dt>
                                <dd><%= cpModel.getAppId()%></dd>
                                <dt>密钥：</dt>
                                <dd><%= cpModel.getSecretId()%></dd>
                                <dt>所属代理商：</dt>
                                <dd><%= userDetails.getLevel()== 1&&cpModel.getAgentId()!=null?cpModel.getAgentId().toString():"无"%></dd>
                                <dt>手续费(%)：</dt>
                                <dd><%= cpModel.getFeeDefaultRecharge()%>%</dd>
                                <dt>每笔提现费用：</dt>
                                <dd><%= cpModel.getCostWithdraw()/100.00%>元</dd>
                                <dt>垫支提现费率：</dt>
                                <dd><%= cpModel.getFeeWithdrawAdvince()%>%</dd>
                                <dt>绑定手机号：</dt>
                                <dd><%= SiteHelper.getEmptyStr(cpModel.getBindMobile(),"无")%></dd>
                                <dt>加入时间：</dt>
                                <dd><%= SiteHelper.getDefaultTimeFormat(cpModel.getCreateTime())%></dd>
                                <hr>
                                <dt>企业名称：</dt>
                                <dd><%= cpInfo.getName()%></dd>
                                <dt>企业法人：</dt>
                                <dd><%= cpInfo.getLegalPerson()%></dd>
                                <dt>法人身份证正面：</dt>
                                <dd><img id="imgIcon1"
                                         class="img-polaroid"
                                         src="<%= cpInfo.getLegalPersonIdcard1()%>" width="140"
                                /></dd>
                                <dt>法人身份证反面：</dt>
                                <dd> <img id="imgIcon2"
                                          class="img-polaroid"
                                          src="<%= cpInfo.getLegalPersonIdcard2()%>" width="140"
                                /></dd>
                                <dt>企业营业执照：</dt>
                                <dd> <img id="imgIcon3"
                                          class="img-polaroid"
                                          src="<%= cpInfo.getBusinessLicensePic()%>" width="140"
                                /></dd>
                                <dt>开户许可证：</dt>
                                <dd><img id="imgIcon4"
                                         class="img-polaroid"
                                         src="<%= cpInfo.getOrgCodeLicense()%>" width="140"
                                /></dd>
                                <dt>企业营业执照注册号：</dt>
                                <dd><%= cpInfo.getBusinessLicenseNo()%></dd>
                                <dt>企业邮箱：</dt>
                                <dd><%= cpInfo.getMail()%></dd>
                                <dt>公司地址：</dt>
                                <dd><%= cpInfo.getAddr()%></dd>
                                <dt>公司网站：</dt>
                                <dd><%= cpInfo.getUrl()%></dd>
                                <dt>所属行业：</dt>
                                <dd><%= cpInfo.getIndustry()%></dd>
                                <dt>联系人：</dt>
                                <dd><%= cpInfo.getContacts()%></dd>
                                <dt>联系人电话：</dt>
                                <dd><%= cpInfo.getContactsTel()%></dd>
                                <dt>联系人手机：</dt>
                                <dd><%= cpInfo.getContactsMobile()%></dd>
                            </dl>
                        </div>
                        <!-- /.box-body -->
                    </div>
                    <!-- /.box -->
                </div>
                <!-- /.col -->
            </div>
            <!-- /.row -->
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <jsp:include page="foot.jsp"></jsp:include>
</div>
<script src="<%= request.getAttribute("StaticHost") %>/js/fastclick.js"></script>
<script src="<%= request.getAttribute("StaticHost") %>/js/adminlte.min.js"></script>
</body>
</html>

